test_template = """
<test-case>
	<id>PDF%03d</id>
	<description>%s</description>
	<input><![CDATA[%s]]></input>
	<exception>%s</exception>
</test-case>
"""

infomation = [
    "3.e3 + 1", "IllegalDecimalException",
    "4 + 10.E+5 + 1", "IllegalDecimalException",
    "3.3e3.3 + 1", "IllegalDecimalException",
    "1 + 3.3E.3 + 2", "IllegalDecimalException",
    "1 + 3.3E-(3 + 2)", "IllegalDecimalException",
    "min(4., 7)", "IllegalDecimalException",
    "12.3Emax(4, 5, 6)", "IllegalDecimalException",
    "5 / v4 + 1/", "IllegalIdentifierException",
    "4 + mix(5, 2) + 1", "IllegalIdentifierException",
    " (5 @ 4) ? 7 : 8", "IllegalSymbolException",
    "(1 + 2) (3 - 4) - 5", "MissingOperatorException",
    "(1 + 2) ^ (3 - 4) 5", "MissingOperatorException",
    "cos(0.5)12.3E+4", "MissingOperatorException",
    "(1 + 2) ^ (3 - ) + 5", "MissingOperandException",
    "3 > 2.5 * 1.5 ? 9 :", "MissingOperandException",
    "3.14 * 2 >= 2.5 * 3 ? (6 : 7) + 8", "MissingOperandException",
    "7 > 0 ? 7 <= 0 ? : 6 : 5", "MissingOperandException",
    "sin()", "MissingOperandException",
    "min()", "MissingOperandException",
    "min(2.5)", "MissingOperandException",
    "min(, 1.8)", "MissingOperandException",
    "max(3.14, )", "MissingOperandException",
    "max(17, , 87)", "MissingOperandException",
    "max(3.14 + 2, )", "MissingOperandException",
    "max((5 < 6 ? 1 : 0), )", "MissingOperandException",
    "true ? : 5", "MissingOperandException",
    "2 + ( ? 4 : 5)", "MissingOperandException",
    "(2 + 3) ^ 3) - ((1 + 1)", "MissingLeftParenthesisException",
    "((2 + 3) ^ ((3 - 1) + 1)", "MissingRightParenthesisException",
    "sin(2, 1)", "FunctionCallException",
    "max5, 6, 8)", "FunctionCallException",
    "cos(3.14, )", "FunctionCallException",
    " false ? 9 : true ? 1 : 3 : 5", "TrinaryOperationException",
    "4 / (12 - 3 * 4) + 1", "DividedByZeroException",
    "(13 < 2 * 5) + 12", "TypeMismatchedException",
    "(13 < 2 * 5) + 12", "TypeMismatchedException",
    "12 ? 34 : 56", "TypeMismatchedException",
    "true ? 42.5 > 5 * 8 : 15", "TypeMismatchedException",
    "4 ^ (32.5 > 65)", "TypeMismatchedException",
    "sin(32.5 > 65)", "TypeMismatchedException",
    "32.5 | 65", "TypeMismatchedException",
]

with open("./tmp", "w") as fout:
    for i in range(0, len(infomation), 2):
        fout.write(test_template%(i // 2 + 1, infomation[i + 1], infomation[i], infomation[i + 1]))